package com.techjava.springboothystrixdemo.hystrix.services.impl;

import org.springframework.stereotype.Service;


public class OrderService {
    public static String queryByOrderId(boolean isDelay) throws InterruptedException {
        if(isDelay){
            //throw new RuntimeException();
            Thread.sleep(2000);
            return "用户延时后查询订单成功";
        }else{
//            Thread.sleep(2000);
            return "用户查询订单成功";
        }
    }
}